<!-- 详情描述组件 -->
<template>
  <c-descriptions
    v-bind="$attrs"
    v-on="$listeners"
    :contentStyle="CS"
    :label-style="ls"
  >
    <slot slot="title" name="title"></slot>
    <slot slot="extra" name="extra"></slot>
    <c-descriptions-item
      :span="item.span"
      v-bind="item"
      v-for="item in infoList"
      :key="item.label"
      :label="item.label"
    >
      {{ item.value }}
      <FileView
        class="blue"
        :files="item.itemFileDTOList"
        v-if="item.itemFileDTOList"
      />
    </c-descriptions-item>
  </c-descriptions>
</template>

<script>
import FileView from './ConsultResult/src/FileView/FileView'
export default {
  name: 'Descriptions',
  props: {
    // 描述列表
    infoList: {
      type: Array,
      default: () => []
    }
  },
  components: {
    FileView
  },
  data() {
    return {
      CS: {
        'max-width': '100px',
        'word-break': 'break-all' //过长时自动换行
      },
      ls: {
        'text-align': 'right',
        width: '106px',
        'font-size': '14px',
        'font-weight': 400,
        color: '#666666'
      }
    }
  },

  computed: {},

  mounted() {},

  methods: {}
}
</script>
<style  lang='scss'>
.el-descriptions__header {
  margin-bottom: 10px;
}
.blue {
  color: #0088ff;
}
</style>
